#pragma once

#include <QWidget>
#include "ui_ClientBarWidget.h"


class QLabel;
class QToolBar;
class QTabBar;
class QButtonGroup;
class QHBoxLayout;
class QSignalMapper;
class QToolButton;
class ClientBarWidget : public QWidget
{
	Q_OBJECT

public:
	ClientBarWidget(QWidget *parent = Q_NULLPTR);
	~ClientBarWidget();
	void insertToolButton(int index, QString imgUrl, QString name);
	void addTooButton(QString imgUrl, QString name);
signals:
	void sysBtnClicked(QString sysName);
	void windowMin();
	void windowMax();
	void windowClose();
protected:
	void paintEvent(QPaintEvent* e);

private:
	void initClientBarWdiget();
private:
	Ui::ClientBarWdiget ui;

public:
	QButtonGroup* btnGroup;
	QLabel* titleLable;
	QTabBar* tabBar;
	//QButtonGroup* btnGroup;
	QList<QToolButton*> btnList;
	QHBoxLayout* btnLay;
	QSignalMapper* btnSigMapper;
	QToolButton* minBtn;
	QToolButton* maxBtn;
	QToolButton* closeBtn;
	int titleFontSize;
	int titleBtnWidth;
};
